home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / A-Monthly Disks / (c)aai.d64 / sub saver ml (.txt) < prev    next >
Commodore BASIC  |  2007-02-04  |  3KB  |  100 lines

  1. 100 REM ************************
  2. 110 REM *    SUBSAVER.BAS      *
  3. 120 REM * BASIC LOADER PROGRAM *
  4. 130 REM *                      *
  5. 140 REM *  BY HOWARD CAMPBELL  *
  6. 150 REM ************************
  7. 160 :
  8. 170 PRINT"[147]ENTER THE START ADDRESS FOR SUBSAVER.ML"
  9. 180 PRINT"49152 IS RECOMMENDED.":INPUTSA
  10. 190 EN=SA+251:TA=SA+197
  11. 200 HBTA=INT(TA/256):LBTA=TA-HBTA*256
  12. 210 GOSUB 1000 : IF T<>32049 THEN PRINT"DATA STATEMENT ERROR":END
  13. 220 POKESA+34,LBTA:POKESA+35,HBTA
  14. 230 POKESA+61,LBTA:POKESA+62,HBTA
  15. 240 F$="SUBSAVER."+STR$(SA): GOSUB1540
  16. 250 GOSUB2040
  17. 260 PRINT"[147]TO LOAD THE PROGRAM TYPE"
  18. 270 PRINT"LOAD"CHR$(34)F$CHR$(34)","DV",1"
  19. 280 PRINT"THEN LOAD THE PROGRAM CONTAINING"
  20. 290 PRINT"THE SUBROUTINES."
  21. 300 PRINT"TO SAVE A SUBROUTINE, TYPE THE FOLLOWING:"
  22. 310 PRINT"SYS"SA",FIRST LINE #,LAST LINE #"
  23. 320 PRINT"FOR EXAMPLE IF YOU WANT TO SAVE FROM"
  24. 330 PRINT"LINES 325 TO 500, TYPE THE FOLLOWING:"
  25. 340 PRINT"SYS"SA",325,500"
  26. 350 PRINT"SUBSAVER WILL DO THE REST!!"
  27. 360 END
  28. 370 :
  29. 380 :
  30. 996 REM ////////////
  31. 997 REM / ML POKER /
  32. 998 REM ////////////
  33. 999 :
  34. 1000 T=0 : FORI= SA TO EN : READA : T=T+A : POKEI,A :NEXTI : RETURN
  35. 1001 DATA32,253,174,32,158,173
  36. 1002 DATA32,247,183,165,20,141
  37. 1003 DATA167,2,165,21,141,168
  38. 1004 DATA2,32,253,174,32,158
  39. 1005 DATA173,32,247,183,32,19
  40. 1006 DATA166,176,4,32,197,192
  41. 1007 DATA96,165,95,133,253,165
  42. 1008 DATA96,133,254,173,167,2
  43. 1009 DATA133,20,173,168,2,133
  44. 1010 DATA21,32,19,166,176,4
  45. 1011 DATA32,197,192,96,165,95
  46. 1012 DATA133,251,165,96,133,252
  47. 1013 DATA160,4,200,177,253,208
  48. 1014 DATA251,152,24,101,253,133
  49. 1015 DATA253,165,254,105,0,133
  50. 1016 DATA254,200,200,152,24,101
  51. 1017 DATA253,133,34,165,254,105
  52. 1018 DATA0,133,35,160,1,162
  53. 1019 DATA0,177,253,153,169,2
  54. 1020 DATA138,145,253,200,192,3
  55. 1021 DATA208,243,160,0,185,235
  56. 1022 DATA192,32,210,255,200,201
  57. 1023 DATA0,208,245,160,0,32
  58. 1024 DATA207,255,153,178,2,200
  59. 1025 DATA192,17,240,4,201,13
  60. 1026 DATA208,241,136,152,162,178
  61. 1027 DATA160,2,32,189,255,169
  62. 1028 DATA8,162,8,160,255,32
  63. 1029 DATA186,255,169,251,166,34
  64. 1030 DATA164,35,32,216,255,169
  65. 1031 DATA8,32,195,255,160,1
  66. 1032 DATA185,169,2,145,253,200
  67. 1033 DATA192,3,208,246,96,160
  68. 1034 DATA0,185,211,192,32,210
  69. 1035 DATA255,200,201,13,208,245
  70. 1036 DATA96,147,76,73,78,69
  71. 1037 DATA32,78,85,77,66,69
  72. 1038 DATA82,32,78,79,84,32
  73. 1039 DATA70,79,85,78,68,13
  74. 1040 DATA0,147,69,78,84,69
  75. 1041 DATA82,32,70,73,76,69
  76. 1042 DATA78,65,77,69,13,0
  77. 1043 :
  78. 1500 REM //////////////////
  79. 1510 REM / DEVICE ENQUIRY /
  80. 1520 REM //////////////////
  81. 1530 :
  82. 1540 PRINT"[147]T[146]APE OR D[146]ISK (T/D)":POKE198,0
  83. 1550 GETA$:IFA$<>"D"ANDA$<>"T"THEN1550
  84. 1560 IFA$="D"THENF$="0:"+F$
  85. 1570 DV=1-7*(A$="D")
  86. 1580 RETURN
  87. 1590 :
  88. 2000 REM ////////////
  89. 2010 REM / SAVE RAM /
  90. 2020 REM ////////////
  91. 2030 :
  92. 2040 T$=F$:NA=PEEK(53)+PEEK(54)*256-LEN(T$):POKE782,NA/256
  93. 2050 POKE781,NA-PEEK(782)*256:POKE780,LEN(T$):SYS65469
  94. 2060 POKE780,1:POKE781,DV:POKE782,0:SYS65466
  95. 2070 POKE254,SA/256:POKE253,SA-PEEK(254)*256:POKE780,253
  96. 2080 POKE782,EN/256:POKE781,EN-PEEK(782)*256:SYS65496
  97. 2090 IF(PEEK(783)AND1)OR(ST AND 191)THENPRINT"SAVE ERROR. PRESS SPACE TO CONT."
  98. 2100 IF(PEEK(783)AND1)OR(ST AND 191)THENPOKE198,0:WAIT198,1,1:GOTO2040
  99. 2110 RETURN
  100.